<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <router-view />
    </div>
  </a-config-provider>
</template>

<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
import enUS from 'ant-design-vue/lib/locale-provider/en_US';
export default {
  name: 'App',
  data() {
    return {
      locale: zhCN,
    };
  },
  mounted:function(){
    if(this.$store.getters.language)
      switch(this.$store.getters.language) {
        case 'zh':
          this.locale = zhCN;
          break;
        case 'en':
          this.locale = enUS;
          break;
        default:
          this.locale = zhCN;
          break;
      }
  },
  methods: {
  }
}
</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#nprogress {
  position: absolute;
  top: 1px;
  width: 100%;
  .bar {
    height: 3px;
    background: #fe9600;
    z-index: 1000;
  }
  .peg {
    box-shadow: 0 0 10px #fe9600, 0 0 5px #fe9600;
  }
}
</style>
